package com.itheima.reggie.common;

/**
 * @author xindezhentu
 * @create 2023-04-04 14:46  基于ThreadLocal的工具类，用于保存和获取当前用户登录ID
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static  Long getCurrentID(){
        return threadLocal.get();
    }
}
